<template>
    <div>
        <div id="topBar" style="position: fixed;width: 100%;background: #fff;z-index: 99;">
            <bar text="空间管理"></bar>
        </div>
<!--        地图盒子-->
        <div style="width: 100%;height: 100%;overflow: hidden;">
            <div id="fengMap"></div>

        </div>
<!--        地图模型透明度调试-->
<!--        <div @click="change" style="position: fixed;bottom: 160px;right:40px;">-->
<!--            <p>点击</p>-->
<!--        </div>-->
<!--        <div @click="change2" style="position: fixed;bottom: 140px;right:40px;">-->
<!--            <p>清除</p>-->
<!--        </div>-->
        <!--楼层切换组件-->
        <div id="btnsFloor" class="btnsFloor">
            <!--多层/单层切换按钮-->
            <span style="display: none" @click="changeViews" :class="{'multi':showIndex == 1}"></span>
            <!--楼层数据-->
            <ul id="floors"></ul>
        </div>
<!--        底栏-->
        <div class="spaceBar">
            <div class="spaceBar-box">
                <img class="spaceBar-img" @click="rentBtn" v-if="rent == 0" style="margin-left: 24px;" src="./images/rent.png" alt="">
                <img class="spaceBar-img" @click="closeRent" v-else style="margin-left: 24px;" src="./images/rentOn.png" alt="">
            </div>
            <div class="spaceBar-box" >
                <img class="spaceBar-img" @click="leaseBtn" v-if="lease == 0" style="margin-left: 12px;" src="./images/lease.png" alt="">
                <img class="spaceBar-img" @click="closeLease" v-else style="margin-left: 12px;" src="./images/leaseOn.png" alt="">
            </div>
            <div class="spaceBar-box" >
                <img class="spaceBar-img" style="margin-left: 12px;" @click="checkBtn" v-if="checkIn == 0" src="./images/check.png" alt="">
                <img class="spaceBar-img" style="margin-left: 12px;" @click="closeCheck" v-else src="./images/checkOn.png" alt="">
            </div>
            <div class="spaceBar-box">
                <img class="spaceBar-img" style="margin-left: 12px;" @click="notBtn"  v-if="not == 0" src="./images/not.png" alt="">
                <img class="spaceBar-img" style="margin-left: 12px;" @click="closeNot" v-else src="./images/notOn.png" alt="">
            </div>

        </div>

<!--        店铺详情-->
        <div id="tip" class="spaceDetail">
           <div class="spaceDetail-box" id="spaceDetail-box">
               <!--            基本信息-->
               <div class="spaceTop" style="position: relative;">
                   <img @click="closeDetail" src="./images/closeTop.png" style="width: 20px;height: 20px;position: absolute;top: 18px;right: 18px;" alt="">
                   <div style="padding-top: 8px;margin-bottom: 16px;">
                       <img @click="closeDetail" v-if="detailMore == 1" src="./images/goDown.png" style="width:40px;height: 10px;" alt="">
                       <img @click="moreBtn" v-else src="./images/goTop.png" style="width:40px;height: 10px;" alt="">
                   </div>
                    <!--可招商-->
                   <div @click="moreBtn" v-if="attract == 2">
                       <div style="display: flex;align-items: center;margin-left: 22px;margin-top: 16px;padding-bottom: 36px;margin-right: 20px;border-bottom: 1px solid #E8E8E8;">
                           <p style="font-size: 18px;color: #2A2A2A;font-family: font2;">店铺编号：{{marketDetail.marketNum}}</p>
                           <p style="width: 56px;height: 20px;line-height: 20px;background: #FF9F3C;border-radius: 10px;margin-left: 10px;text-align: center;font-size: 11px;color:#fff;box-shadow:0px 2px 3px 0px rgba(255,159,60,0.4);">可招商</p>
                       </div>
                       <p class="spaceTop-txt">详细信息</p>
                       <!--                可招商信息-->
                       <div style="margin-bottom: 20px;">
                           <p class="spaceTxt1">租金价格：<span style="color: #255ED7;">{{marketDetail.monthRent}}元/月</span></p>
                           <p class="spaceTxt1">可用面积：<span style="color: #255ED7;">{{marketDetail.usableArea}}㎡   </span></p>
                       </div>
                       <div class="spaceLine2" style="margin-top: -2px;"></div>
                   </div>
                    <!--在租中-->
                   <div @click="moreBtn" v-if="attract == 0">
                       <div style="display: flex;align-items: center;margin-left: 22px;margin-top: 16px;margin-right: 20px;">
                           <p style="font-size: 18px;color: #2A2A2A;font-family: font2;">{{marketDetail.brand}}</p>
                           <p style="width: 56px;height: 20px;line-height: 21px;background: #2F70FF;border-radius: 10px;margin-left: 10px;text-align: center;font-size: 11px;color:#fff;box-shadow:0px 2px 3px 0px rgba(157,196,255,0.4);margin-top: 1px;">在租中</p>
                           <p style="width: 64px;height: 20px;line-height: 21px;background: #EB5D5D;border-radius: 10px;margin-left: 10px;text-align: center;font-size: 11px;color:#fff;box-shadow:0px 2px 3px 0px rgba(255,174,174,0.4);" v-if="marketDetail.deadline == 1">即将到期</p>
                       </div>
                       <p style="margin-top: 10px;margin-left: 22px;font-size: 12px;color: #666666;padding-bottom: 14px;">起：{{leaseTime[0]}} —— 止：{{leaseTime[1]}}</p>
                       <div class="spaceLine2"></div>
                       <p class="spaceTop-txt">租户联系方式</p>
                       <div style="margin-top: 4px;margin-left: 22px;margin-right: 22px;border-bottom: 1px solid #E8E8E8;padding-bottom: 16px;margin-bottom: -2px;">
                            <div style="display: flex;align-items: center;margin-top: 14px;">
                                <img src="./images/Contacts.png" style="width:20px;height: 20px;" alt="">
                                <p style="color: #333333;font-size: 15px;margin-left: 10px;">联系人：{{marketDetail.tenantName}}</p>
                            </div>
                           <div style="display: flex;align-items: center;margin-top: 14px;">
                               <img src="./images/phone.png" style="width:20px;height: 20px;" alt="">
                               <div style="color: #333333;font-size: 15px;margin-left: 10px;display: flex;">电 <p style="width: 15px;height: 2px;"></p> 话：{{marketDetail.tenantTel}}</div>
                           </div>
                       </div>
                   </div>
<!--                   已预订-->
                   <div @click="moreBtn" v-if="attract == 1">
                       <div style="display: flex;align-items: center;margin-left: 22px;margin-top: 16px;margin-right: 20px;">
                           <p style="font-size: 18px;color: #2A2A2A;font-family: font2;">店铺编号：{{marketDetail.marketNum}}</p>
                           <p style="width: 56px;height: 20px;line-height: 20px;background: #35C077;border-radius: 10px;margin-left: 10px;text-align: center;font-size: 11px;color:#fff;box-shadow:0px 2px 3px 0px rgba(167,212,188,0.4);">已预订</p>
                       </div>
                       <p style="margin-top: 10px;margin-left: 22px;font-size: 12px;color: #666666;padding-bottom: 14px;">预定时间：{{marketDetail.leaseTime}} </p>
                       <div class="spaceLine2"></div>
                       <p class="spaceTop-txt">预定人联系方式</p>
                       <div style="margin-top: 4px;margin-left: 22px;margin-right: 22px;border-bottom: 1px solid #E8E8E8;padding-bottom: 16px;margin-bottom: 16px;">
                           <div style="display: flex;align-items: center;margin-top: 14px;">
                               <img src="./images/Contacts.png" style="width:20px;height: 20px;" alt="">
                               <p style="color: #333333;font-size: 15px;margin-left: 10px;">联系人：{{marketDetail.tenantName}}</p>
                           </div>
                           <div style="display: flex;align-items: center;margin-top: 14px;">
                               <img src="./images/phone.png" style="width:20px;height: 20px;" alt="">
                               <p style="color: #333333;font-size: 15px;margin-left: 10px;">电    话：{{marketDetail.tenantTel}}</p>
                           </div>
                       </div>
                   </div>

               </div>

               <div v-if="detailMore == 1">
                   <!--在租中详细信息-->
                   <div v-if="attract == 0">
                       <p class="spaceTop-txt">详细信息</p>
                       <p class="spaceDetail-list">商铺性质：{{marketDetail.busyCat}}</p>
                       <p class="spaceDetail-list">品牌名称：{{marketDetail.brand}}</p>
                       <p class="spaceDetail-list">租金价格：{{marketDetail.monthRent }}元/月</p>
                       <p class="spaceDetail-list">合同编号：{{marketDetail.contractNum }}</p>
                       <p class="spaceDetail-list">商铺编号：{{marketDetail.marketNum }}</p>
                       <p class="spaceDetail-list" style="margin-bottom: 16px;">可用面积：{{marketDetail.marketDetail}}㎡   </p>
                       <div class="spaceLine2"></div>
                   </div>
<!--                   已预订详细信息-->
                   <div v-if="attract == 1">
                       <p class="spaceTop-txt">详细信息</p>
                       <p class="spaceDetail-list">商铺性质：{{marketDetail.busyCat}}</p>
                       <p class="spaceDetail-list">定金价格：{{marketDetail.frontMoney }}</p>
                       <p class="spaceDetail-list">租金价格：{{marketDetail.monthRent }}元/月</p>
                       <p class="spaceDetail-list">可用面积：{{marketDetail.marketDetail}}㎡   </p>
                       <p class="spaceDetail-list" style="margin-bottom: 16px;">渠道来源：招商   </p>
                       <div class="spaceLine2"></div>
                   </div>

                   <!--            建筑规格-->
                   <div class="spaceArchitecture">
                       <p class="spaceTop-txt">建筑规格</p>
                       <div class="spaceArchitecture-box">
                           <div style="width: 216px;height: 136px;background: #F7F7F7;">
                               <img :src="marketDetail.buildUrl " style="width: 100%;height: 100%;" alt="">
                           </div>
                           <div style="margin-left: 12px;">
                               <p style="font-size: 12px;color: #666666;margin-top: 4px;">长：{{marketDetail.length}}m</p>
                               <p style="font-size: 12px;color: #666666;margin-top: 10px;">宽：{{marketDetail.width}}m</p>
                               <p style="font-size: 12px;color: #666666;margin-top: 10px;">高：{{marketDetail.height}}m</p>
                               <p style="font-size: 12px;color: #666666;margin-top: 36px;">建筑面积：</p>
                               <p style="font-size: 18px;color: #387BFF;margin-top: 10px;">{{marketDetail.totalArea}}㎡</p>
                           </div>
                       </div>
                   </div>

<!--                   负责人联系方式-->
                   <div v-if="attract == 0 || attract == 1">
                       <div class="spaceLine2">
                       </div>
                       <p class="spaceTop-txt">负责人联系方式</p>
                       <div class="bottomTxt">
                            <p style="color: #333333;font-size: 13px;margin-left: 20px;flex: 1;">负责人：{{marketDetail.picName }}</p>
                           <p style="color: #333333;font-size: 13px;flex: 1;">电话：{{marketDetail.picTel }}</p>
                       </div>
                   </div>

               </div>
           </div>

        </div>
<!--        租金色块划分-->
        <div class="rentColor" v-if="rent == 1">
            <div style="display: flex;align-items: center;margin-bottom: 14px;">
                <img src="./images/color11.png" style="width: 17px;height: 15px;" alt="">
                <p style="font-size: 11px;color: #333333;margin-left: 16px;">20,000元/月以上</p>
            </div>
            <div style="display: flex;align-items: center;margin-bottom: 14px;">
                <img src="./images/color12.png" style="width: 17px;height: 15px;" alt="">
                <p style="font-size: 11px;color: #333333;margin-left: 16px;">10,000-20,000元/月</p>
            </div>
            <div style="display: flex;align-items: center;margin-bottom: 14px;">
                <img src="./images/color13.png" style="width: 17px;height: 15px;" alt="">
                <p style="font-size: 11px;color: #333333;margin-left: 16px;">10,000元/月以下</p>
            </div>
        </div>
<!--        业态色块展示 checkIn-->
        <div class="rentColor">
            <div v-if="rent == 0 && lease == 0 && checkIn == 0 && not == 0 && floorId == 1">
                <div style="display: flex;align-items: center;">
                    <div style="display: flex;align-items: center;">
                        <img src="./images/color7.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">服饰</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color2.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">餐饮</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color1.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">电子数码</p>
                    </div>
                </div>
                <div style="display: flex;align-items: center;margin-top: 10px;">
                    <div style="display: flex;align-items: center;">
                        <img src="./images/color4.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">娱乐</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color5.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">饰品</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color26.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">空铺</p>
                    </div>
                </div>
            </div>
            <div v-if="rent == 0 && lease == 0 && checkIn == 0 && not == 0 && floorId == 2">
                <div style="display: flex;align-items: center;">
                    <div style="display: flex;align-items: center;">
                        <img src="./images/color7.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">服饰</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color2.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">餐饮</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color1.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">电子数码</p>
                    </div>
                </div>
                <div style="display: flex;align-items: center;margin-top: 10px;">
                    <div style="display: flex;align-items: center;">
                        <img src="./images/color4.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">娱乐</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color5.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">饰品</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color6.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">空铺</p>
                    </div>
                </div>
            </div>
            <div v-if="rent == 0 && lease == 0 && checkIn == 0 && not == 0 && floorId == 3">
                <div style="display: flex;align-items: center;">
                    <div style="display: flex;align-items: center;">
                        <img src="./images/color7.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">服饰</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color1.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">电子数码</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color4.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">娱乐</p>
                    </div>
                </div>
                <div style="display: flex;align-items: center;margin-top: 10px;">
                    <div style="display: flex;align-items: center;">
                        <img src="./images/color5.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">饰品</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color6.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">空铺</p>
                    </div>
                </div>
            </div>
            <div v-if="rent == 0 && lease == 0 && checkIn == 0 && not == 0 && floorId == 4">
                <div style="display: flex;align-items: center;">
                    <div style="display: flex;align-items: center;">
                        <img src="./images/color2.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">餐饮</p>
                    </div>
                    <div style="display: flex;align-items: center;margin-left: 30px;">
                        <img src="./images/color6.png" style="width: 17px;height: 15px;" alt="">
                        <p style="font-size: 11px;color: #333333;margin-left: 16px;">空铺</p>
                    </div>
                </div>
            </div>
        </div>
<!--        已入住色块展示-->
        <div class="rentColor" v-if="checkIn == 1">
            <div style="display: flex;align-items: center;">
                <div style="display: flex;align-items: center;">
                    <img src="./images/color8.png" style="width: 17px;height: 15px;" alt="">
                    <p style="font-size: 11px;color: #333333;margin-left: 16px;">已入驻</p>
                </div>
                <div style="display: flex;align-items: center;margin-left: 30px;">
                    <img src="./images/color26.png" style="width: 17px;height: 15px;" alt="">
                    <p style="font-size: 11px;color: #333333;margin-left: 16px;">未入驻</p>
                </div>
            </div>
        </div>
<!--        未入住-->
        <div class="rentColor" v-if="not == 1">
            <div style="display: flex;align-items: center;">
                <div style="display: flex;align-items: center;">
                    <img src="./images/color9.png" style="width: 17px;height: 15px;" alt="">
                    <p style="font-size: 11px;color: #333333;margin-left: 16px;">未入驻</p>
                </div>
                <div style="display: flex;align-items: center;margin-left: 30px;">
                    <img src="./images/color10.png" style="width: 17px;height: 15px;" alt="">
                    <p style="font-size: 11px;color: #333333;margin-left: 16px;">已入驻</p>
                </div>
            </div>
        </div>
<!--        lease租约到期-->
        <div class="rentColor" v-if="lease == 1">
            <div style="display: flex;align-items: center;">
                <div style="display: flex;align-items: center;">
                    <img src="../img/05.png" style="width: 34px;height: 34px;" alt="">
                    <p style="font-size: 11px;color: #333333;margin-left: 10px;">即将到期</p>
                </div>
            </div>
        </div>

    </div>
</template>

<script>
    import defaultImg from './images/phone.png'
    import fengmap from '../../mapJs/fengmap2.min.js'
    import titles from "../../components/titleBar";
    import bar from "../../components/topBar";
    export default {
        props: {},
        components: {
            titles,
            bar,
        },
        name: "spaceMap",
        data(){
            return{
                isMap:'',
                multiFlag:false,
                showIndex:0,
                defaultIndex:3,
                defaultFocusID:1,
                alertMars:[],
                dmLayer:null,
                // 租金,租约，已入住，未入住
                rent:0,
                lease:0,
                checkIn:0,
                not:0,
                // 店铺出租情况 0在租中 1已预订 2可招商
                attract:0,
                // 展示全部信息
                detailMore:0,
                // 已入住列表
                lista:[],
                liatb:[],
                listd:[],
                // 租金列表
                renta:[],
                rentb:[],
                rentc:[],

                // 租约到期
                leaseList:[],
                floorId:1,
                // 店铺详情
                marketDetail:[],
                leaseTime:'',
                leaseListb:[]

            }
        },
        mounted() {
            this.map()
        },
        methods: {

            // 地图渲染
            map: function () {
                var that = this
                var fmapID = 'huiyunquanlian123'; //mapId
                var map = new fengmap.FMMap({
                    container: document.getElementById("fengMap"), //设置显示地图容器
                    appName: 'bimDemo',           //开发者申请应用名称
                    key: 'a3476b2a1a8fb8fcfd75422908f25610',  //开发者申请应用下web服务的key
                    defaultVisibleGroups: [1],           //设置初始显示楼层，数组格式，可单个，可多个
                    defaultFocusGroup: 1,               //初始聚焦楼层
                    defaultThemeName: 'huiyunquanlian123',
                    defaultMapScaleLevel: 19,
                    focusAnimateMode: true,            //开启聚焦层切换的动画显示
                    viewModeAnimateMode: false,          //开启2维，3维切换的动画显示
                    moveToAnimateMode: false,           //地图定位跳转动画设置
                    tile:true,
                    defaultBackgroundColor:'#F9F9F9',
                    defaultControlsPose:1,
                });
                that.isMap = map
                map.openMapById(fmapID);
                var groupControl;
                //2D、3D控件配置
                var toolControl = new fengmap.toolControl(map, {
                    init2D: false,   //初始化2D模式
                    groupsButtonNeeded: false,   //设置为false表示只显示2D,3D切换按钮
                    offset: {
                        x: -22,
                        y: 172
                    },
                    //点击按钮的回调方法,返回type表示按钮类型,value表示对应的功能值
                    clickCallBack: function (type, value) {
                        // console.log(type,value);
                    }
                });
                //地图加载完成回掉方法
                var defaultFocusID = 1;
                //楼层索引值
                // var defaultIndex = this.defaultIndex;
                map.on('loadComplete', function () {
                    //创建楼层(按钮型)，创建时请在地图加载后(loadComplete回调)创建。
                    // groupControl = new fengmap.scrollGroupsControl(map, ctlOpt);
                    // 自定义楼层切换组件

                    document.getElementById('btnsFloor').style.display = 'block';
                    // var groupIDs = map.groupIDs.reverse();
                    var groupIDs = [4,3,2,1]
                    var ulHtml = '';
                    groupIDs.map(function (item, index) {
                        var className = item === defaultFocusID ? "active" : "changeFloor";
                        ulHtml += '<li class="' + className + '" onclick="changeFloor(this,' + item + ', ' + index + ')">F' + item + '</li>';
                    });

                    //楼层组件Dom
                    var ulDom = document.getElementById('floors');
                    ulDom.innerHTML = ulHtml;
                });
                // 地图点击事件
                map.on('mapClickNode', function (event) {

                    // console.log(event)
                    // 1034703011 10347030130 10347030122
                    // 点击店铺展示店铺详情
                    var typeID = event.target.typeID
                    that.typeID = typeID
                    var fid = event.target.FID
                    var array = [200000, 180000, 100100, 170000, 100000, 160000, 190000, 190000, 150000, 120000, 140106, 100104,110000,140000]
                    const map1 = array.map(x => {
                        if (typeID == x) {
                            that.$api.get('market/store/details?fid=' + fid, {}, response => {
                                if (response.status >= 200 && response.status < 300) {
                                    var x = document.getElementById("tip")
                                    x.className = "show";
                                    that.marketDetail = response.data.data
                                    that.attract = response.data.data.status
                                    var leaseTime = response.data.data.leaseTime
                                    that.leaseTime = leaseTime.split("--")

                                    //请求成功，response为成功信息参数

                                } else {
                                    // console.log(response.message);
                                    //请求失败，response为失败信息
                                }
                            });

                        }
                    });

                })


            },
            // 关闭店铺详情展示
            closeDetail(){
                var x = document.getElementById("tip")
                x.className = "hidden";
                this.detailMore = 0
                document.getElementById('topBar').style.display='block'
                document.getElementById('spaceDetail-box').style.position = 'static'
                document.getElementById('spaceDetail-box').style.height = 'auto'
                document.getElementById('spaceDetail-box').style.overflow = 'auto'
            },
            // 展示全部信息
            moreBtn(){
                this.detailMore = 1
                var height = document.documentElement.clientHeight
                if(this.attract != 2){
                    document.getElementById('spaceDetail-box').style.position = 'static'
                    document.getElementById('spaceDetail-box').style.height = height + 'px'
                    document.getElementById('spaceDetail-box').style.overflow = 'auto'
                    document.getElementById('topBar').style.display='none'
                }

            },
            // 模块变色
            searchByParams: function (params) {
                // console.log(params)
                var map = this.isMap
                var searchAnalyser = new fengmap.FMSearchAnalyser(map)
                var searchRequest = new fengmap.FMSearchRequest();
                //配置keyword参数
                if (params.keyword && params.keyword != '') {
                    searchRequest.keyword = params.keyword;
                }

                //配置groupID参数
                if (params.groupID) {
                    searchRequest.groupID = params.groupID
                }

                //配置FID参数
                if (params.FID) {
                    searchRequest.FID = params.FID;
                }
                //配置typeID参数
                if (params.typeID != null) {
                    searchRequest.typeID = params.typeID;
                }

                //配置nodeType参数
                if (params.nodeType != null) {
                    searchRequest.nodeType = params.nodeType;
                }
                //配置楼层参数
                if (params.groupID != null) {
                    searchRequest.groupID = params.groupID;
                }
                if (params.floors != null) {
                    searchRequest.floors = params.floors;
                }
                /**
                 * 根据请求对象查询分析方法
                 * https://www.fengmap.com/docs/js/v2.3.0_beta/fengmap.FMSearchAnalyser.html#query
                 * */
                var sortRes = [];
                searchAnalyser.query(searchRequest, function (result) {
                    sortRes = result;
                    // console.log(result)
                });

                return sortRes;
            },
            findModelByFid: function (list,color) {
                console.log(list)
                var map = this.isMap
                var params = {};
                // "1034703011","10347030130","10347030122",
                // params.FID = ["1034701014","10347010122"];
                params.FID = list
                params.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params.floors = group;
                var result = this.$options.methods.searchByParams.bind(this)(params);
                if (result.length > 0) {
                    for (var i = 0; i < result.length; i++) {
                        var model = result[i];
                        var selectedModel = null
                        if (model != null) {
                            //视野中心移动到指定位置,如果不是当前聚焦层，将先设置目标层为聚焦层在跳转
                            // 模块透明
                            // model.target.setColor('rgba(0,0,0.01)', 0.1)
                            // model.target.show = false
                            var coord = {
                                x: model.mapCoord.x,
                                y: model.mapCoord.y,
                                groupID: model.groupID
                            };
                            // map.moveTo(coord);
                            //模型节点对象
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                if (selectedModel && selectedModel.FID != target.FID) {
                                    // selectedModel.selected = false;

                                }
                                // target.show = false
                                model.target.setColor(color)
                                // target.selected = true;
                                selectedModel = target;
                            }
                        }
                    }

                }
            },
            findModelByFids: function (list) {
                var map = this.isMap
                var params = {};
                // params.FID = ["1034701014","10347010122"];
                params.FID = list;
                params.nodeType = fengmap.FMNodeType.MODEL;
                // params.typeID = 140300;
                // params.groupID = 2;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params.floors = group;
                var result = this.$options.methods.searchByParams.bind(this)(params);
                if (result.length > 0) {
                    for (var i = 0; i < result.length; i++) {
                        var model = result[i];
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                if (selectedModel && selectedModel.FID != target.FID) {
                                    // selectedModel.selected = false;
                                }
                                target.setColorToDefault()
                                // target.selected = false;
                                selectedModel = target;
                            }
                        }
                    }

                }
            },
            change() {
                // 模块颜色透明
                this.$options.methods.findModelByFid.bind(this)(1);
                // 添加icon标志
                // this.$options.methods.addWarn.bind(this)();
                // 添加动图icon
                // this.$options.methods.flash.bind(this)();
            },
            // 添加icon标志
            addWarn() {
                // console.log(1)
                var map = this.isMap
                var group = map.getFMGroup(map.focusGroupID);
                var layer = group.getOrCreateLayer('imageMarker');
                // var gpos = group.mapCoord;
                // console.log(2)
                var im = new fengmap.FMImageMarker({
                    //标注x坐标点
                    x: 12961651.109441677,
                    //标注y坐标点
                    y: 4861877.255674953,
                    //设置图片路径
                    url: require('../img/01.gif'),
                    //设置图片显示尺寸
                    size: 40,
                    //标注高度，大于model的高度
                    height: 4
                });
                // console.log(3)
                layer.addMarker(im);
                // console.log(4)
            },
            // 添加动图icon
            flash(list) {
                var map = this.isMap
                var params = {};
                // params.FID = ["1034701014","10347010113","10347010118"];
                params.FID = list
                params.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params.floors = group;
                var result = this.$options.methods.searchByParams.bind(this)(params);

                let startArert = false;
                var map = this.isMap
                var group = map.getFMGroup(map.focusGroupID);
                // let alertMars = [];
                var zf_x = 1;
                var zf_y = 1;
                var img = require('../img/05.png')

                if (result.length > 0) {
                    for (var i = 0; i < result.length; i++) {
                        var model = result[i];
                        var selectedModel = null
                        if (model != null) {
                            let domMarker = new fengmap.FMDomMarker({
                                x: model.mapCoord.x,
                                y: model.mapCoord.y,
                                height: 5,
                                domWidth: '30',
                                domHeight: '30',
                                // domContent: '<div class="container"><div class="dot">啦啦啦</div><div class="pulse"></div><div class="pulse-big"></div></div>',
                                domContent: '<img style="height:30px;height:30px;" src="' + img + '">',
                                anchor: fengmap.FMMarkerAnchor.BOTTOM
                            });
                            this.dmLayer = map.getFMGroup(map.focusGroupID).getOrCreateLayer('domMarker');
                            this.dmLayer.addMarker(domMarker);
                            this.alertMars.push(domMarker);
                        }
                    }

                }

                if (Math.random() < 0.25) {
                    zf_x = 1;
                    zf_y = 1;
                } else if (Math.random() >= 0.25 && Math.random() < 0.5) {
                    zf_x = -1;
                    zf_y = 1;
                } else if (Math.random() >= 0.5 && Math.random() < 0.75) {
                    zf_x = -1;
                    zf_y = -1;
                } else {
                    zf_x = 1;
                    zf_y = -1;
                }
                console.log(1)
            },
            // 清除动图icon
            change2(){
                // 清除动图icon
                if (this.dmLayer) {
                    this.dmLayer.removeAll();
                    this.alertMars=[];
                }

                // 色块选中清除
                // this.$options.methods.findModelByFids.bind(this)(1);
            },
            // 自定义楼层切换组件
            changeViews(domObj) {
                // console.log(domObj.target)
                var map = this.isMap
                var multiFlag = this.multiFlag
                if (multiFlag) {
                    //切换为单楼层展示
                    this.showIndex = 0
                } else {
                    //切换为多楼层展示
                    this.showIndex = 1
                }

                //切换地图单层-false/多层展示-true
                multiFlag = !multiFlag;
                this.multiFlag = multiFlag
                //设置单/多楼层切换
                map.showSingerOrMultiGroup(multiFlag);
            },
            changeFloor(domObj, floorId, index) {
                var defaultIndex = this.defaultIndex;
                var defaultFocusID = this.defaultFocusID
                var map = this.isMap
                this.floorId = floorId
                var multiFlag = this.multiFlag
                if (map) {
                    //设置地图显示楼层
                    if (multiFlag) {
                        //展示全部楼层
                        map.visibleGroupIDs = map.groupIDs;
                    } else {
                        //展示单个楼层
                        map.visibleGroupIDs = [floorId];
                    }
                    //设置地图聚焦楼层
                    map.focusGroupID = floorId;
                    //修改楼层样式
                    //取消选中上一次选中楼层
                    domObj.parentNode.children[defaultIndex].classList.remove('active');
                    domObj.parentNode.children[defaultIndex].classList.add('changeFloor');
                    //选中当前楼层
                    domObj.classList.add('active');
                    var group = (map.getFMGroup(map.focusGroupID)).groupID;
                    if(this.checkIn == 1){
                        var map = this.isMap
                        var group = (map.getFMGroup(map.focusGroupID)).groupID;
                        this.$options.methods.notColorBtn2.bind(this)();
                        // this.$options.methods.findModelByFids.bind(this)(this.lista);
                        this.$api.get('market/store/used?floor=' + group, {}, response => {
                            if (response.status >= 200 && response.status < 300) {
                                this.liatb = response.data.data.high
                                this.listd = response.data.data.low
                                this.$options.methods.notColorBtn3.bind(this)();

                            } else {
                                // console.log(response.message);
                                //请求失败，response为失败信息
                            }
                        });
                    }else if(this.not == 1){
                        var map = this.isMap
                        var group = (map.getFMGroup(map.focusGroupID)).groupID;
                        this.$options.methods.notColorBtn2.bind(this)();
                        this.$api.get('market/store/used?floor=' + group, {}, response => {
                            if (response.status >= 200 && response.status < 300) {
                                this.liatb = response.data.data.high
                                this.listd = response.data.data.low
                                this.$options.methods.notColorBtn.bind(this)();

                            } else {

                            }
                        });
                    }else if(this.rent == 1){
                        var map = this.isMap
                        var group = (map.getFMGroup(map.focusGroupID)).groupID;
                        this.$options.methods.rentDivide2.bind(this)();
                        this.$api.get('/market/store/rent?floor=' + group, {}, response => {
                            if (response.status >= 200 && response.status < 300) {
                                this.renta = response.data.data.low
                                this.rentb = response.data.data.middle
                                this.rentc = response.data.data.high
                                this.$options.methods.rentDivide.bind(this)();

                            } else {

                            }
                        });
                    }else if(this.lease == 1){
                        var map = this.isMap
                        var group = (map.getFMGroup(map.focusGroupID)).groupID;
                        this.$options.methods.change2.bind(this)();
                        this.$options.methods.findModelByFids.bind(this)(this.leaseList);
                        this.$options.methods.findModelByFids.bind(this)(this.leaseListb);
                        this.$api.get('market/store/leaseTime?floor=' + group, {}, response => {
                            if (response.status >= 200 && response.status < 300) {
                                this.leaseList = response.data.data.low
                                this.leaseListb = response.data.data.high
                                this.$options.methods.findModelByFid.bind(this)(this.leaseList,'#F6D0CE');
                                this.$options.methods.findModelByFid.bind(this)(this.leaseListb,'#C6E4FC');
                                this.$options.methods.flash.bind(this)(this.leaseList);

                            } else {
                            }
                        });
                    }
                    //更新选中楼层id及索引
                    this.defaultFocusID = floorId;
                    this.defaultIndex = index;
                }
            },

            // 点击租金
            rentBtn(){
                var map = this.isMap
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                this.$options.methods.findModelByFids.bind(this)(this.lista);
                if(this.not == 1){
                    this.$options.methods.findModelByFids.bind(this)(this.liatb);
                    this.$api.get('/market/store/rent?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.renta = response.data.data.low
                            this.rentb = response.data.data.middle
                            this.rentc = response.data.data.high
                            this.$options.methods.rentDivide.bind(this)();

                        } else {

                        }
                    });
                }else if(this.checkIn == 1){
                    this.$options.methods.findModelByFids.bind(this)(this.lista);
                    this.$api.get('/market/store/rent?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.renta = response.data.data.low
                            this.rentb = response.data.data.middle
                            this.rentc = response.data.data.high
                            this.$options.methods.rentDivide.bind(this)();

                        } else {

                        }
                    });
                }else if(this.lease == 1){
                    this.$options.methods.change2.bind(this)();
                    this.$options.methods.findModelByFids.bind(this)(this.leaseList);
                    this.$options.methods.findModelByFids.bind(this)(this.leaseListb);
                    this.$api.get('/market/store/rent?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.renta = response.data.data.low
                            this.rentb = response.data.data.middle
                            this.rentc = response.data.data.high
                            this.$options.methods.rentDivide.bind(this)();

                        } else {

                        }
                    });
                }else{
                    this.$api.get('/market/store/rent?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.renta = response.data.data.low
                            this.rentb = response.data.data.middle
                            this.rentc = response.data.data.high
                            this.$options.methods.rentDivide.bind(this)();

                        } else {

                        }
                    });
                }
                this.lease = 0
                this.checkIn = 0
                this.not = 0
                this.rent = 1

            },
            // 取消点击租金
            closeRent(){
                this.rent = 0
                this.$options.methods.rentDivide2.bind(this)();
            },
            // 点击租约
            leaseBtn(){
                var map = this.isMap
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                if(this.not == 1){
                    this.$options.methods.findModelByFids.bind(this)(this.listb);
                    this.$api.get('market/store/leaseTime?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.leaseList = response.data.data.low
                            this.leaseListb = response.data.data.high
                            this.$options.methods.findModelByFid.bind(this)(this.leaseList,'#F6D0CE');
                            this.$options.methods.findModelByFid.bind(this)(this.leaseListb,'#C6E4FC');
                            this.$options.methods.flash.bind(this)(this.leaseList);

                        } else {
                        }
                    });
                }else if(this.rent == 1){
                    this.$options.methods.rentDivide2.bind(this)();
                    this.$api.get('market/store/leaseTime?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.leaseList = response.data.data.low
                            this.leaseListb = response.data.data.high
                            this.$options.methods.findModelByFid.bind(this)(this.leaseList,'#F6D0CE');
                            this.$options.methods.findModelByFid.bind(this)(this.leaseListb,'#C6E4FC');
                            this.$options.methods.flash.bind(this)(this.leaseList);

                        } else {
                        }
                    });
                }else if(this.checkIn == 1){
                    this.$options.methods.findModelByFids.bind(this)(this.lista);
                    this.$api.get('market/store/leaseTime?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.leaseList = response.data.data.low
                            this.leaseListb = response.data.data.high
                            this.$options.methods.findModelByFid.bind(this)(this.leaseList,'#F6D0CE');
                            this.$options.methods.findModelByFid.bind(this)(this.leaseListb,'#C6E4FC');
                            this.$options.methods.flash.bind(this)(this.leaseList);

                        } else {
                        }
                    });
                }else {
                    this.$api.get('market/store/leaseTime?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.leaseList = response.data.data.low
                            this.leaseListb = response.data.data.high
                            this.$options.methods.findModelByFid.bind(this)(this.leaseList,'#F6D0CE');
                            this.$options.methods.findModelByFid.bind(this)(this.leaseListb,'#C6E4FC');
                            this.$options.methods.flash.bind(this)(this.leaseList);

                        } else {
                        }
                    });
                }


                this.rent = 0
                this.checkIn = 0
                this.not = 0
                this.lease = 1
            },
            // 取消点击租约
            closeLease(){
                this.lease = 0
                this.$options.methods.change2.bind(this)();
                this.$options.methods.findModelByFids.bind(this)(this.leaseList);
                this.$options.methods.findModelByFids.bind(this)(this.leaseListb);
            },
            // 已入住点击
            checkBtn(){
                var map = this.isMap
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                if(this.not == 1){
                    this.$options.methods.findModelByFids.bind(this)(this.listb);
                    this.$api.get('market/store/used?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.liatb = response.data.data.high
                            this.listd = response.data.data.low
                            this.$options.methods.notColorBtn3.bind(this)();

                        } else {
                            // console.log(response.message);
                            //请求失败，response为失败信息
                        }
                    });
                }else if(this.rent == 1){
                    this.$options.methods.rentDivide2.bind(this)();
                    this.$api.get('market/store/used?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.liatb = response.data.data.high
                            this.listd = response.data.data.low
                            this.$options.methods.notColorBtn3.bind(this)();

                        } else {

                        }
                    });
                }else if(this.lease == 1){
                    this.$options.methods.change2.bind(this)();
                    this.$options.methods.findModelByFids.bind(this)(this.leaseList);
                    this.$options.methods.findModelByFids.bind(this)(this.leaseListb);
                    this.$api.get('market/store/used?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.liatb = response.data.data.high
                            this.listd = response.data.data.low
                            this.$options.methods.notColorBtn3.bind(this)();
                            // this.lista = response.data.data.low
                            // this.$options.methods.findModelByFid.bind(this)(this.lista,'#70A4FF');

                        } else {
                            // console.log(response.message);
                            //请求失败，response为失败信息
                        }
                    });
                }else{
                    this.$api.get('market/store/used?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.liatb = response.data.data.high
                            this.listd = response.data.data.low
                            this.$options.methods.notColorBtn3.bind(this)();
                            // this.$options.methods.findModelByFid.bind(this)(this.lista,'#70A4FF');
                        } else {
                            // console.log(response.message);
                            //请求失败，response为失败信息
                        }
                    });
                }
                this.rent = 0
                this.lease = 0
                this.not = 0
                this.checkIn = 1
            },
            // 取消已注入点击
            closeCheck(){
                this.checkIn = 0
                this.$options.methods.notColorBtn2.bind(this)();
                // this.$options.methods.findModelByFids.bind(this)(this.lista);
            },
            // 点击未入住
            notBtn(){
                var map = this.isMap
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                if(this.checkIn == 1){
                    this.$options.methods.findModelByFids.bind(this)(this.lista);
                    this.$api.get('market/store/used?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.liatb = response.data.data.high
                            this.listd = response.data.data.low
                            this.$options.methods.notColorBtn.bind(this)();

                        } else {

                        }
                    });
                }else if(this.rent == 1){
                    this.$options.methods.rentDivide2.bind(this)();
                    this.$api.get('market/store/used?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.liatb = response.data.data.high
                            this.listd = response.data.data.low
                            this.$options.methods.notColorBtn.bind(this)();

                        } else {

                        }
                    });
                }else if(this.lease == 1){
                    this.$options.methods.change2.bind(this)();
                    this.$options.methods.findModelByFids.bind(this)(this.leaseList);
                    this.$options.methods.findModelByFids.bind(this)(this.leaseListb);
                    this.$api.get('market/store/used?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.liatb = response.data.data.high
                            this.listd = response.data.data.low
                            this.$options.methods.notColorBtn.bind(this)();

                        } else {

                        }
                    });
                } else {
                    this.$api.get('market/store/used?floor=' + group, {}, response => {
                        if (response.status >= 200 && response.status < 300) {
                            this.liatb = response.data.data.high
                            this.$api.get('market/store/used?floor=' + group, {}, response => {
                                if (response.status >= 200 && response.status < 300) {
                                    this.listc = response.data.data.high
                                    this.listd = response.data.data.low
                                    this.$options.methods.notColorBtn.bind(this)();

                                } else {
                                    // console.log(response.message);
                                    //请求失败，response为失败信息
                                }
                            });


                        } else {

                        }
                    });
                }
                this.rent = 0
                this.lease = 0
                this.checkIn = 0
                this.not = 1

            },
            closeNot(){
                this.not = 0
                this.$options.methods.notColorBtn2.bind(this)();
            },
            // 租金色块划分
            rentDivide(){
                var map = this.isMap
                var params1 = {};
                params1.FID = this.renta
                params1.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params1.floors = group;
                var result1 = this.$options.methods.searchByParams.bind(this)(params1);
                if (result1.length > 0) {
                    for (var i = 0; i < result1.length; i++) {
                        var model = result1[i];
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                model.target.setColor('#C6E4FC')
                                // target.setColorToDefault()
                            }
                        }
                    }

                }
                var params2 = {};
                params2.FID = this.rentb
                params2.nodeType = fengmap.FMNodeType.MODEL;
                // var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params2.floors = group;
                var result2 = this.$options.methods.searchByParams.bind(this)(params2);
                if (result2.length > 0) {
                    for (var i = 0; i < result2.length; i++) {
                        var model = result2[i];
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                model.target.setColor('#9CCCFF')
                                // target.setColorToDefault()
                            }
                        }
                    }

                }
                var params3 = {};
                params3.FID = this.rentc
                params3.nodeType = fengmap.FMNodeType.MODEL;
                // var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params3.floors = group;
                var result3 = this.$options.methods.searchByParams.bind(this)(params3);
                if (result3.length > 0) {
                    for (var i = 0; i < result3.length; i++) {
                        var model = result3[i];
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                model.target.setColor('#70A4FF')
                                // target.setColorToDefault()
                            }
                        }
                    }

                }
            },
            rentDivide2(){
                var map = this.isMap
                var params1 = {};
                params1.FID = this.renta
                params1.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params1.floors = group;
                var result1 = this.$options.methods.searchByParams.bind(this)(params1);
                if (result1.length > 0) {
                    for (var i = 0; i < result1.length; i++) {
                        var model = result1[i];
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                // model.target.setColor('#72DEB4')
                                target.setColorToDefault()
                            }
                        }
                    }

                }
                var params2 = {};
                params2.FID = this.rentb
                params2.nodeType = fengmap.FMNodeType.MODEL;
                // var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params2.floors = group;
                var result2 = this.$options.methods.searchByParams.bind(this)(params2);
                if (result2.length > 0) {
                    for (var i = 0; i < result2.length; i++) {
                        var model = result2[i];
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                // model.target.setColor('#F8CB63')
                                target.setColorToDefault()
                            }
                        }
                    }

                }
                var params3 = {};
                params3.FID = this.rentc
                params3.nodeType = fengmap.FMNodeType.MODEL;
                // var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params3.floors = group;
                var result3 = this.$options.methods.searchByParams.bind(this)(params3);
                if (result3.length > 0) {
                    for (var i = 0; i < result3.length; i++) {
                        var model = result3[i];
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                // model.target.setColor('#FF7866')
                                target.setColorToDefault()
                            }
                        }
                    }

                }
            },
            // 未入住色块
            notColorBtn(){
                var map = this.isMap
                var params1 = {};
                params1.FID = this.liatb
                params1.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params1.floors = group;
                var result1 = this.$options.methods.searchByParams.bind(this)(params1);
                if (result1.length > 0) {
                    for (var i = 0; i < result1.length; i++) {
                        var model = result1[i];
                        var coord = {
                            x: model.mapCoord.x,
                            y: model.mapCoord.y,
                            groupID: model.groupID
                        };
                        // map.moveTo(coord);
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                if (selectedModel && selectedModel.FID != target.FID) {
                                    // selectedModel.selected = false;

                                }
                                // model.target.show = false

                                model.target.setColor('#FF6767')
                                // target.setColorToDefault()
                            }
                        }
                    }

                }

                var params2 = {};
                params2.FID = this.listd
                params2.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params2.floors = group;
                var result1 = this.$options.methods.searchByParams.bind(this)(params2);
                if (result1.length > 0) {
                    for (var i = 0; i < result1.length; i++) {
                        var model = result1[i];
                        var coord = {
                            x: model.mapCoord.x,
                            y: model.mapCoord.y,
                            groupID: model.groupID
                        };
                        // map.moveTo(coord);
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                model.target.setColor('#C6E4FC')

                                // target.setColorToDefault()
                            }
                        }
                    }

                }

            },
            notColorBtn2(){
                var map = this.isMap
                var params1 = {};
                params1.FID = this.liatb
                params1.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params1.floors = group;
                var result1 = this.$options.methods.searchByParams.bind(this)(params1);
                if (result1.length > 0) {
                    for (var i = 0; i < result1.length; i++) {
                        var model = result1[i];
                        var coord = {
                            x: model.mapCoord.x,
                            y: model.mapCoord.y,
                            groupID: model.groupID
                        };
                        // map.moveTo(coord);
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                target.setColorToDefault()
                            }
                        }
                    }

                }

                var params2 = {};
                params2.FID = this.listd
                params2.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params2.floors = group;
                var result1 = this.$options.methods.searchByParams.bind(this)(params2);
                if (result1.length > 0) {
                    for (var i = 0; i < result1.length; i++) {
                        var model = result1[i];
                        var coord = {
                            x: model.mapCoord.x,
                            y: model.mapCoord.y,
                            groupID: model.groupID
                        };
                        // map.moveTo(coord);
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                target.setColorToDefault()
                            }
                        }
                    }

                }

            },
            // 已入住色块
            notColorBtn3(){
                var map = this.isMap
                var params1 = {};
                params1.FID = this.liatb
                params1.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params1.floors = group;
                var result1 = this.$options.methods.searchByParams.bind(this)(params1);
                if (result1.length > 0) {
                    for (var i = 0; i < result1.length; i++) {
                        var model = result1[i];
                        var coord = {
                            x: model.mapCoord.x,
                            y: model.mapCoord.y,
                            groupID: model.groupID
                        };
                        // map.moveTo(coord);
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                if (selectedModel && selectedModel.FID != target.FID) {
                                    // selectedModel.selected = false;

                                }
                                // model.target.show = false

                                model.target.setColor('#E9E9E9')
                                // target.setColorToDefault()
                            }
                        }
                    }

                }

                var params2 = {};
                params2.FID = this.listd
                params2.nodeType = fengmap.FMNodeType.MODEL;
                var group = (map.getFMGroup(map.focusGroupID)).groupID;
                params2.floors = group;
                var result1 = this.$options.methods.searchByParams.bind(this)(params2);
                if (result1.length > 0) {
                    for (var i = 0; i < result1.length; i++) {
                        var model = result1[i];
                        var coord = {
                            x: model.mapCoord.x,
                            y: model.mapCoord.y,
                            groupID: model.groupID
                        };
                        // map.moveTo(coord);
                        var selectedModel = null
                        if (model != null) {
                            var target = model.target;
                            //渲染当前设置的模型元素处于高亮状态
                            if (target) {
                                model.target.setColor('#4887FA')

                                // target.setColorToDefault()
                            }
                        }
                    }

                }

            },

        },
        created() {
            window.changeFloor= this.changeFloor
        },
    }
</script>

<style lang="scss" >
    #fengMap {
        position: absolute;
        width:100%;
        height: 100%;
    }
    p {
        text-align: left;
    }
    body {
        margin: 0;
        padding: 0;
        overflow: hidden;
        font-family: font1 !important;
    }
    /*楼层切换组件样式*/
    /deep/.fm-control-groups{
        width:42px !important;
        height:176px !important;
        border-radius: 42px !important;
        background:#fff !important;
    }
    hr{
        display: none !important;
    }
    /*自定义楼层切换组件*/
    .btnsFloor span{
        display: block;
        width: 100%;
        height: 40px;
        line-height: 40px;
        text-align: center;
        cursor: pointer;
        background: url(./images/layer.png) no-repeat center;
        background-size: 80% 80%;
    }
    .btnsFloor{
        width: 40px;
        height: 180px;
        background: #fff;
        position: fixed;
        right: 20px;
        top: 280px;
        border-radius: 22px;
        box-shadow:0px 2px 25px 4px rgba(0,0,0,0.08);
    }
    .btnsFloor span.multi{
        background: url(./images/layers.png) no-repeat center !important;
        background-size: 60% 60%;
        width: 100%;
        height: 40px;
    }
    #floors{
        margin-top: 10px;
        font-family: font2;
    }
    .changeFloor{
        font-size: 12px;
        color: #333333;
        width: 40px;
        height: 40px !important;
        margin: 0 auto;
        line-height: 40px !important;
    }
    .active{
        font-size: 12px;
        color: #255ED7;
        width: 40px;
        height: 40px !important;
        margin: 0 auto;
        line-height: 40px !important;
    }
    /*2D 3D切换*/
    .fm-control-tool-3d{
        border-radius: 50% !important;
        background-size: 24px auto !important;
        background-position:center !important;
        box-shadow:0px 1px 13px 2px rgba(0,0,0,0.06) !important;
        width: 40px !important;
        height: 40px !important;
    }
    /*底栏*/
    .spaceBar{
        width: 100%;
        height: 88px;
        box-shadow:0px 1px 13px 0px rgba(212,212,212,1);
        border-radius:10px 10px 1px 1px;
        background:rgba(249,249,249,1);
        position: fixed;
        bottom: 0;
        left: 0;
        display: flex;
        z-index: 10;
    }
    .spaceBar-img{
        width: 74px;
        height: 76px;
        margin-top: 10px;

    }
    /*店铺详情*/
    #tip{
        visibility: hidden;
        width: 100%;
        background: #fff;
        color: white;
        position: fixed;
        bottom: 0;
        left: 0;
        box-shadow: 0px 1px 5px 2px rgba(0, 0, 0, 0.06);
        border-radius: 10px 10px 0px 0px;
        z-index: 20;
    }
    #tip.show {
        visibility: visible;
        animation: fadein .6s;
    }
    @keyframes fadein {
        from {
            opacity: 0.8;
            bottom: -160px;
        }
        to {
            opacity: 1;
            bottom: 0px;
        }
    }
    /*分割线*/
    .spaceTop-txt{
        font-size: 12px;
        color: #999999;
        margin-top: 14px;
        margin-left: 22px;
    }
    .spaceTxt1{
        font-size: 15px;
        color: #333333;
        margin-top: 14px;
        margin-left: 22px;
    }
    .spaceLine2{
        width: 336px;
        margin: 0 auto 0 auto;
        height: 1px;
        background: #E8E8E8;
    }
    .spaceArchitecture-box{
        margin-top: 12px;
        margin-left: 22px;
        display: flex;
        margin-bottom: 22px;
    }
    .spaceDetail-list{
        font-size: 15px;
        color: #333333;
        margin-left: 22px;
        margin-top: 14px;
    }
    /*租金色块划分*/
    .rentColor{
        position: fixed;
        top: 70px;
        z-index: 10;
        left: 26px;
    }
    .bottomTxt{
        width: 334px;height: 38px;background: #F9F9F9;margin-top: 11px;margin-left: 22px;display: flex;margin-bottom: 80px;
        line-height: 38px;
    }


</style>
